﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CmdServer
{
    class Program
    {
        static Matrix mtrix = new Matrix();
        static void Main(string[] args)
        {
            Console.CancelKeyPress += Console_CancelKeyPress;
            Console.WriteLine("程序开始");
            mtrix.Start();
            while (true) ;
        }

        static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
        {

            Console.WriteLine("开始终止程序");
            mtrix.Stop();
            Console.WriteLine("程序终止完成，按任意键退出");
            Console.ReadKey();
        }
    }
}
